import React from "react";
import {render} from "react-dom";
import App from "./src/App";
import fetch from "isomorphic-fetch";

if (!window.fetch) window.fetch = fetch;

Object.assign(document.body.style, {
  backgroundColor: "#eee",
  color: "#333",
  padding: 0,
  margin: 0,
});

const root = document.createElement("div");
document.body.appendChild(root);

const viewport = document.createElement("meta");
viewport.setAttribute("name", "viewport");
viewport.setAttribute("content", "width=device-width, initial-scale=1");
document.head.appendChild(viewport);

const favicon = document.createElement("link");
favicon.setAttribute("rel", "icon");
favicon.setAttribute("href", "./favicon.png");
favicon.setAttribute("type", "image/x-icon");
document.head.appendChild(favicon);

document.title = "图片处理 - Picture";

render(<App />, root);
